import 'package:flutter/widgets.dart';
import 'package:flutter/material.dart';
import 'account/credit_mixin.dart';
import '../public.dart';

/// 过期记录
class MyCreditPage extends StatefulWidget {
  MyCreditPage({Key key}) : super(key: key);
  @override
  _MyAccountState createState() => _MyAccountState();
}

class _MyAccountState extends State<MyCreditPage>
    with AutomaticKeepAliveClientMixin, CreditMixin<MyCreditPage> {
  ThemeProvider theme;
  @override
  void initState() {
    super.initState();
    getUserScore(1);
  }

  @override
  void requestHanddle() {
    getUserScore(1);
  }

  @override
  Widget build(BuildContext context) {
    super.build(context);
    theme = Provider.of<ThemeProvider>(context);
    return Scaffold(
        backgroundColor: theme.primaryColor,
        appBar: AppBar(
          title: Text('过期记录'),
          leadingWidth: 44,
          leading: BackComponent(),
          backgroundColor: theme.primaryColor,
          centerTitle: true,
          actions: <Widget>[],
        ),
        body: commonBuild(context));
  }

  @override
  bool get wantKeepAlive => true;
}
